The computer operates a CPU 602, a chip set 603 and an input/output interface 604 in synchronism with a system clock pulse generated by a system clock (clock generator) 601 inside the system, as shown in FIG. 6. Thus, in the system in which a plurality of computers or other apparatuses cooperate to perform the processings, it is required that the system clock is synchronized with the reference clock (specific external clock or system clock of a specific apparatus).
The accuracy for synchronization of the system clock among a plurality of apparatuses, which may be appropriately decided according to the system configuration or the uses, is required in a unit of 1 millisecond for a contents distribution system for digital broadcasting, for example. Nowadays, in the computer of workstation class, the system clock may supposedly contain an error of several tens microseconds, whereby it is required to correct the system clock at every interval of several seconds to several tens seconds to keep the accuracy in a unit of 1 millisecond.
Various techniques for synchronizing the time among a plurality of apparatuses have been conventionally offered.
Those conventional synchronization methods involve synchronizing the time by comparing the time of the system clock for each apparatus, in which the synchronization accuracy is improved by performing a statistical processing to resolve a delay till each apparatus replies the time in response to a time inquiring request or a delay caused through the communication between apparatuses.
As described above, for synchronization of the time among the plurality of apparatuses, though the required accuracy of synchronization may be decided according to the system configuration or the uses, it is important that the signal for time notice from a clock to be referenced (herein after a reference clock) is detected without delay to achieve synchronization at high accuracy, and the time of the system clock (herein after an internal clock) of comparison object is acquired without delay.
As means for acquiring those information without delay, a device driver of a TTY (teletype) device for acquiring those information may be remolded, or a function of creating a system call replacing the TTY device driver may be provided for the system. However, in the case of using a different hardware or making the version-up of the system, there is a problem that a lot of maintenance cost is needed.
Thus, if synchronization means between the reference clock and the system clock is implemented as a user process of the OS (Operating System), the maintenance is facilitated and the universality is enhanced.
However, since various processes are usually operating in the computer at any time, there is a fear that there occurs a delay in a process for detecting the signal for time notice from the reference clock or the subsequent process due to influence from a daemon process or interrupt handlers of other devices, if the synchronization means is implemented as the user process.
Also, with the conventional time synchronization method, it is taken into consideration to deal with a response to the time inquiring request or a delay in the communication between apparatuses, but it is not devised to detect the signal for time notice or acquire the internal time without delay.
Thus, it is an object of the invention to implement the synchronization at high accuracy by detecting the signal for time notice from an external reference clock without delay, and acquiring the time of a system clock of comparison object at the present time without delay.
Also, it is another object of the invention to implement a scheme of synchronization in which the maintenance is easy and the universality is high by acquiring those information as a user process for the OS.